#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    timerid_1 = startTimer(1000);
    timerid_2 = startTimer(2000);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::timerEvent(QTimerEvent *event)
{
    if(event->timerId() == timerid_1)
    {
        ui->lcdNumber->display(ui->lcdNumber->intValue() + 1);
    }
    if(event->timerId() == timerid_2)
    {
        ui->lcdNumber_2->display(ui->lcdNumber_2->intValue() + 1);
    }
}
